<?xml version="1.0"?>
<html>
	<head>
		<title>hols como estan</title>
		<link rel="shortcut icon" href="http://o1.t26.net/images/favicon.ico?1.0" type="image/x-icon" />
		<base href="../"/>
		<link rel="stylesheet" href="core/css/themes/delicious/jxtheme.css" type="text/css" media="screen" charset="utf-8">
		<style type="text/css">
		body{overflow:hidden}
		#Aplicacion.active_accesskey .jxlib-accesskey
		{
			color:red;
		}
		</style>
		<script type="text/javascript" src="core/javascript/jxlib.core.compress.js" id="core_jxlib"></script>
		<script type="text/javascript">
function popup_open()
{
	var html = '<html><head><title>hola bonito</title>'
			+'<base href="../"/>'
			+'<link rel="stylesheet" href="core/css/themes/crispin/jxtheme.css" type="text/css" media="screen" charset="utf-8"/>'
			+'<style type="text/css"></style>'
			+'<sc'+'ript type="text/javascript" src="'+ $('core_jxlib').get("src") +'"></scr'+'ipt>'
			+'<sc'+'ript type="text/javascript">window.addEvent("domready",function(){'+
			+'alert("juan");'
			+'});</scr'+'ipt></head>'
			+'<body>'
			+'<div id="divisor">todo bom</div>'
			+'<sc'+'ript type="text/javascript">alert($("divisor"));</sc'+'ript>'
			+'</body></html>';
    //my_window = window.open("data:text/html;charset=utf-8,"+html, "mywindow1", "status=1,width=350,height=150");
	var my_window = window.open("/xhtml/popup.html", "mywindow1", "status=1,width=350,height=150,resizable=yes,status=yes,dependent=yes");
	my_window.addEventListener("load",function(){
		//alert(this.$("id_app"));
		this.create_application('id_app','other_table');

	});
	/*var my_window = chrome.windows.create({
		url: "/xhtml/popup.html"
		,type: "popup"
		,width:350
		,height:150},function(w){
		alert(my_window);
		});*/
	//my_window.onCreated.addListener(function(ventana){ alert("asdsa");});
	//my_window.addListener(function(){ alert("creado")});

	//my_window.document.title="asdsad";
	//alert(my_window.document.title);
	//my_window.document.open("text/html", "replace");
	/*my_window.window.title = "todo ns";
	with (my_window.document)
	{
		write("<html><head><title>DOMsds</title><scr"+"ipt type=\"text/javascript\">alert(window.document.title);</scr"+"ipt></head><body>\n");
		write('<h1>Popup Test!6</h1>');
		write("</body></html>\n");
		write(html);
	}/**/

}
		var juanjo;
//var dom1 = document.createElement('object');
//dom1.addEventListener('load',function(){alert('cargadoooo3o12o3o')});
//dom1.setAttribute('')
		window.addEvent("domready",function(){
		juanjo = " soy juajjex";
		});

		window.addEvent("domready",function(){
		//$("h").set("text", "asssssdsa");

		var myScript = Asset.javascript('/user/javascript/alerta.js', {
				id: 'myScript',
				onLoad: function(){
					//alert('alerta.js fue carfado');
				}
			});
		});

 window.addEvent('load', function() {
      // our custom javascript goes in here.
new Jx.Layout('Aplicacion');

var toolbar = new Jx.Toolbar({id:"toolbar_id"});

var sayHello = new Jx.Button({
  label: 'Say Hello',
  onClick: function() {
    //alert('Hello!');
	boton();
	$jx('toolbar_id').render();
  }
});

toolbar.add(sayHello);
toolbar.add(
	new Jx.Button({
	  label: 'victor',
	  onClick: function() {
		this.setLabel("jeej");
		//this.setEnabled(false);
		panel.setContentURL("http://localhost/core/index.php");
	  }
	})
);
toolbar.add(new Jx.Button({
	  label: '[V]er Iframe',
	  accesskey:'V',
	  href:false,
	  onClick: function() {
	  popup_open();
	  }
}));
var panel = new Jx.Panel({
	collapse:false,
	hideTitle:true,
   label: "Software Victor 1.0",
  id:"body",
  toolbars: [toolbar],
  content:$('main_body').get("html")
});
$('main_body').set("text","");
$('Aplicacion').resize();
panel.addTo('Aplicacion');
window.addEvents({
		//'pagehide':function(){alert("me ocultastes");},
		'keydown':function(event){
		$jx('body').setContent(event.key);
			if (event.alt){
				$('Aplicacion').addClass('active_accesskey');
			}

			if(event.key == 'f5')
			{
				alert("f5 no funciona");
				event.stop();
			}
		},
		'keyup':function(event){

				$('Aplicacion').removeClass('active_accesskey');

		}
});

//menuContext();
    });

		</script>
	</head>
	<body>
<div id="Aplicacion" style="border:2px solid green">
	<h1>Cargando Aplicacion</h1>
</div>
<div id="main_body"><input type="file" x-webkit-accept="image/*;capture=camera"/>.
<input type="text" style="width:100%" id="texto" />
<input id="gt-speech-in"
onwebkitspeechchange="$('texto').set('value',this.value);"
type="text" speech="speech" x-webkit-speech="x-webkit-speech" x-webkit-grammar="builtin:translate" size="1" lang="es" style="" placeholder="UNKNOWN_TYPE" title="heuristic type:"/>
<br />
<br />
<br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
asdsadds
</div>
	</body>
</html>